package com.hndct.common.result;

/**
 * @ProjectName: ump-mine
 * @PachageName: com.hndct.common.result
 * @Author: YuZhenDong
 * @Discription: 返回信息类
 * @Date: 2019/4/13
 * ClassName: ResultEnum
 */
public enum ResultEnum {
    //成功
    SUCCESS(200, "success"),
    //失败
    FAIL(400, "fail"),
    FAIL_NEED_LOGIN(401, "未登录"),
    FAIL_REPEAT_REGISTER(402, "该用户已注册"),
    FAIL_USER_NOT_EXIST(403, "不存在该用户"),
    FAIL_PASSWORD_ERROR(404, "密码错误"),
    FAIL_EMPTY_USERNAME(405, "用户名为空"),
    FAIL_EMPTY_PASSWORD(406, "密码为空"),
    //异常
    ERROR_SYSTEM(500,"系统错误"),
    ERROR_UNKNOWN(501, "未知错误"),
    ERROR_ORDER(502,"订单错误：购买达到上限"),
    ERROR_DATA(503,"数据异常"),
    ERROR_DATABASE_CONNECTION(504,"数据库连接异常");








    private Integer code;

    private String msg;

    private ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
